package com.nwpu.coursesupport.service.param;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.nwpu.coursesupport.entity.TaskAssignment;
import com.nwpu.coursesupport.enumeration.LessonType;
import com.nwpu.coursesupport.enumeration.Status;
import lombok.ToString;

import java.util.Date;
import java.util.List;

public class TaskAssignmentServiceParam{
    public static class CreateParam extends TaskAssignment{

    }

    public static class UpdateParam extends TaskAssignment{

    }

    public static class UnAssignLessonParam {
    	private int classId;
    	private LessonType lessonType;
    	private int taskId;

		public int getClassId() {
			return classId;
		}
		public void setClassId(int classId) {
			this.classId = classId;
		}
		public LessonType getLessonType() {
			return lessonType;
		}
		public void setLessonType(LessonType lessonType) {
			this.lessonType = lessonType;
		}
		public int getTaskId() {
			return taskId;
		}
		public void setTaskId(int taskId) {
			this.taskId = taskId;
		}

    }

    public static class UpdateDeadLine{
    	private int id;
    	private Date deadline;
		public int getId() {
			return id;
		}
		public void setId(int id) {
			this.id = id;
		}
		public Date getDeadline() {
			return deadline;
		}
		public void setDeadline(Date deadline) {
			this.deadline = deadline;
		}

    }

    public static class UpdateAssignStatusParam{
    	private int id;
        @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm")
    	private Date deadline;
    	private Status isVisible;
    	private Status isAnswerVisible;
		@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm")
    	private Date  publishDatetime;

		public Date getPublishDatetime() {
			return publishDatetime;
		}

		public void setPublishDatetime(Date publishDatetime) {
			this.publishDatetime = publishDatetime;
		}

		public int getId() {
			return id;
		}
		public void setId(int id) {
			this.id = id;
		}
		public Date getDeadline() {
			return deadline;
		}
		public void setDeadline(Date deadline) {
			this.deadline = deadline;
		}
		public Status getIsVisible() {
			return isVisible;
		}
		public void setIsVisible(Status isVisible) {
			this.isVisible = isVisible;
		}
		public Status getIsAnswerVisible() {
			return isAnswerVisible;
		}
		public void setIsAnswerVisible(Status isAnswerVisible) {
			this.isAnswerVisible = isAnswerVisible;
		}
    }

    public static class ShowAnswerParam{
        private int id;
        private Status isVisible;
		public int getId() {
			return id;
		}
		public void setId(int id) {
			this.id = id;
		}
		public Status getIsVisible() {
			return isVisible;
		}
		public void setIsVisible(Status isVisible) {
			this.isVisible = isVisible;
		}
    }

    @ToString
    public static class BatchParam{
    	private Integer lessonId;
    	private Status isVisible;
	    private Status isAnswerVisible;
	    private int numsOfAnswerers;
	    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm")
	    private Date deadline;

		@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm")
		private Date publishDatetime;

		public Date getPublishDatetime() {
			return publishDatetime;
		}

		public void setPublishDatetime(Date publishDatetime) {
			this.publishDatetime = publishDatetime;
		}

		public Integer getLessonId() {
			return lessonId;
		}
		public void setLessonId(Integer lessonId) {
			this.lessonId = lessonId;
		}
		public Status getIsVisible() {
			return isVisible;
		}
		public void setIsVisible(Status isVisible) {
			this.isVisible = isVisible;
		}
		public Status getIsAnswerVisible() {
			return isAnswerVisible;
		}
		public void setIsAnswerVisible(Status isAnswerVisible) {
			this.isAnswerVisible = isAnswerVisible;
		}
		public Date getDeadline() {
			return deadline;
		}
		public void setDeadline(Date deadline) {
			this.deadline = deadline;
		}
		public int getNumsOfAnswerers() {
			return numsOfAnswerers;
		}
		public void setNumsOfAnswerers(int numsOfAnswerers) {
			this.numsOfAnswerers = numsOfAnswerers;
		}

    }

    @ToString
    public static class BatchCreateParam{
    	private Integer taskId;
    	private List<BatchParam> items;

		public Integer getTaskId() {
			return taskId;
		}
		public void setTaskId(Integer taskId) {
			this.taskId = taskId;
		}
		public List<BatchParam> getItems() {
			return items;
		}
		public void setItems(List<BatchParam> items) {
			this.items = items;
		}

    }
}
